package com.example.blog_system.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Created with IntelliJ IDEA.
 * Description: 文章列表页的 文章视图类
 */
@Data
public class ArticleInfoVO implements Serializable {
    private static final long serialVersionUID = 1L;
    private String username;
    private Integer id;
    private Integer uid;
    private String title;
    private String description;
    private String content;
    //Date 类型 支持 spring 配置日期格式
    // private Data updatetime;

    //    局部设置日期格式 通过注解 修饰 日期属性 设置 日期格式年-月-日 时:分:秒 和时区:东八区
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatetime;
    private Integer rcount;
    private Integer likedcount;
    private Integer commentcount;
    private Integer collection_count;
//    文章热度: 收藏数*5+点赞数*4+评论数*2+阅读量*1
    private Integer heat;
    private Integer state;
}
